package com.hiultra.archive.service.impl;

import java.util.List;
import com.hiultra.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hiultra.archive.mapper.WatermarkConfiglsMapper;
import com.hiultra.archive.domain.WatermarkConfigls;
import com.hiultra.archive.service.IWatermarkConfiglsService;

/**
 * 水印配置Service业务层处理
 * 
 * @author ls
 * @date 2023-08-29
 */
@Service
public class WatermarkConfiglsServiceImpl implements IWatermarkConfiglsService 
{
    @Autowired
    private WatermarkConfiglsMapper watermarkConfiglsMapper;

    /**
     * 查询水印配置
     * 
     * @param watermarkId 水印配置主键
     * @return 水印配置
     */
    @Override
    public WatermarkConfigls selectWatermarkConfiglsByWatermarkId(Long watermarkId)
    {
        return watermarkConfiglsMapper.selectWatermarkConfiglsByWatermarkId(watermarkId);
    }

    /**
     * 查询水印配置列表
     * 
     * @param watermarkConfigls 水印配置
     * @return 水印配置
     */
    @Override
    public List<WatermarkConfigls> selectWatermarkConfiglsList(WatermarkConfigls watermarkConfigls)
    {
        return watermarkConfiglsMapper.selectWatermarkConfiglsList(watermarkConfigls);
    }

    /**
     * 新增水印配置
     * 
     * @param watermarkConfigls 水印配置
     * @return 结果
     */
    @Override
    public int insertWatermarkConfigls(WatermarkConfigls watermarkConfigls)
    {
        watermarkConfigls.setCreateTime(DateUtils.getNowDate());
        return watermarkConfiglsMapper.insertWatermarkConfigls(watermarkConfigls);
    }

    /**
     * 修改水印配置
     * 
     * @param watermarkConfigls 水印配置
     * @return 结果
     */
    @Override
    public int updateWatermarkConfigls(WatermarkConfigls watermarkConfigls)
    {
        watermarkConfigls.setUpdateTime(DateUtils.getNowDate());
        return watermarkConfiglsMapper.updateWatermarkConfigls(watermarkConfigls);
    }

    /**
     * 批量删除水印配置
     * 
     * @param watermarkIds 需要删除的水印配置主键
     * @return 结果
     */
    @Override
    public int deleteWatermarkConfiglsByWatermarkIds(Long[] watermarkIds)
    {
        return watermarkConfiglsMapper.deleteWatermarkConfiglsByWatermarkIds(watermarkIds);
    }

    /**
     * 删除水印配置信息
     * 
     * @param watermarkId 水印配置主键
     * @return 结果
     */
    @Override
    public int deleteWatermarkConfiglsByWatermarkId(Long watermarkId)
    {
        return watermarkConfiglsMapper.deleteWatermarkConfiglsByWatermarkId(watermarkId);
    }
}
